package com.chenu.gamscriptman.config;

import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author flyan
 * date 2019-12-23
 * @function AMQP消息队列配置类，使用的是RabbitMQ实现
 */
@Configuration
public class AMQPconfig {

    /**
     * 配置默认(jdk序列化)消息内容转换器为 json消息内容转换器
     */
    @Bean
    public MessageConverter messageConverter(){
        return new Jackson2JsonMessageConverter();
    }

}
